{% extends "blog/base.html" %}
{% load static wagtailcore_tags widget_tweaks %}

{% block content %}

<h1>Contact</h1>
<br>

<form action="{% pageurl page %}" method="POST">
    {% csrf_token %}

    {% if form.non_field_errors %}
      <div class="alert alert-danger" role="alert">
        {% for error in form.non_field_errors %}
          {{ error }}
        {% endfor %}
      </div>
    {% endif %}

    {% for field in form.visible_fields %}
      <div class="form-group">
        {{ field.label_tag }}
        {% render_field field class+="form-control" %}
      </div>
    {% endfor %}

    <button type="submit" class="btn btn-primary" >Submit</button>
</form>

{% endblock %}
